import request from '@/utils/request'

// 查询国籍信息列表
export function listAll(query) {
  return request({
    url: '/api/tzxm/nationality/selectList',
    method: 'get',
    params: query
  })
}

/**
 * 新增国家信息
 * @param data
 * @returns {AxiosPromise}
 */
export function addList(data) {
  return request({
    url: '/api/tzxm/nationality/add',
    method: 'post',
    data
  })
}


/**
 * 修改国家信息
 * @param data
 * @returns {AxiosPromise}
 */
export function updateById(data) {
  return request({
    url: '/api/tzxm/nationality/edit',
    method: 'post',
    data
  })
}

/**
 * 删除国家信息
 * @param data
 * @returns {AxiosPromise}
 */
export function deleteById(id) {
  return request({
    url: '/api/tzxm/nationality/delete/'+id,
    method: 'post',
  })
}

/**
 * 根据id查询
 * @param dictSort
 * @returns {AxiosPromise}
 */
export function getById(dictSort) {
  return request({
    url: '/api/tzxm/nationality/'+dictSort,
    method: 'get',
  })
}
